package org.dromara.common.heweather.api;

import org.dromara.common.heweather.dto.*;

import java.io.IOException;
import java.util.List;

/**
 * 天气预报接口文档
 * @Author: Stars
 * @Date: 2025/4/4 19:38
 */
public interface HeWeatherApi {

    /**
     * 城市搜索
     */
    List<CitySearchDTO> searchCity(String location) throws IOException;

    /**
     * 实时天气
     * <a href="https://dev.qweather.com/docs/api/weather/weather-now">实时天气API</a>>
     * @param location 经纬度或者城市名称
     * @return
     */
    WeatherNowDTO weatherNow(String location) throws IOException;


    /**
     * 每日天气预报
     */
    List<DailyWeatherForecastDTO> dailyWeather(String location) throws IOException;

    /**
     * 逐个小时天气预报
     */
    List<HourlyWeatherForecastDTO> hourlyWeatherForecast(String location) throws IOException;

    /**
     * 天气指数预报
     * @param location 地理信息
     * @param type 查询指数类型，多个使用引文逗号隔开
     * @return
     * @throws IOException
     */
    List<WeatherIndexDTO> weatherIndex(String location, String type) throws IOException;
}
